﻿using VASJ.Common;

namespace VASJ.Model
{
    public class ResourceManager
    {
        public static string GetResourceTitle(string key, string language)
        {
            string title = string.Empty;
            foreach (LanguageItem item in LocalizationManager.LocalizationInstant.Languages)
            {
                if (item != null)
                {
                    if (item.Identifier.Equals(key) && item.Language.Equals(language))
                    {
                        title = item.Title;
                    }
                }
            }
            return title;
        }

        public static string GetResourceDesc(string key, string language)
        {
            string desc = string.Empty;
            foreach (LanguageItem item in LocalizationManager.LocalizationInstant.Languages)
            {
                if (item != null)
                {
                    if (item.Identifier.Equals(key) && item.Language.Equals(language))
                    {
                        desc = item.Description;
                    }
                }
            }
            return desc;
        }
    }
}
